package com.hp.service.impl;

import com.hp.dao.UserDao;
import com.hp.entity.User;
import com.hp.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: LiuQiang
 * @Date: 2021/10/22 22:03
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findUserByNameAndPass(User user) {
        return userDao.findUserByNameAndPass(user);
    }

    @Override
    public List<User> userList() {
        return userDao.userList();
    }

    @Override
    public int findUserByIdDelete(Integer id) {
        return userDao.findUserByIdDelete(id);
    }

    @Override
    public User findUserById(Integer id) {
        return userDao.findUserById(id);
    }

    @Override
    public int userUpdate(User user) {
        return userDao.userUpdate(user);
    }

    @Override
    public int userSave(User user) {
        return userDao.userSave(user);
    }

    @Override
    public int userReset(User user) {
        return userDao.userReset(user);
    }

    @Override
    public int userReg(User user) {
        return userDao.userSave(user);
    }

}
